Component({
  data: {
    selected: 0,
    id:1,
 
  },
  attached() {
    console.log("1")
  },
  created(){
    console.log("1")
  },
  methods: {
    tab_tz(e) {
      const data = e.currentTarget.dataset
      console.log(data.id)
      const url = data.path
      wx.switchTab({url})
      var id = e.currentTarget.dataset.id

      this.setData({
        selected: data.index,
        id: id
      })
    }
  }
})